<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .content{
            width: 400px;
            background: #ccc;
            line-height:100px;
            margin: auto;
        }
        h2{
            text-align: center;
        }
        .box{
            width: 500px;
            border: 1px solid #f00;
            margin: auto;
            line-height: 200px;
            text-align: center;
        }
        .box2 .content1{
            display: inline-block;
            height: auto;
            line-height:1;
            width: 400px;
            background: #ccc;
        }
    </style>
</head>
<body>
    <div class="content">item div</div>
    <div class="box box2">
            <h2>6.absolute + margin: auto</h2>
            <h2>6.absolute + margin: auto1</h2>
</body>
</html>
